package com.iap.admin.mediator
{
	import com.iap.admin.event.AdminMenuEvent;
	import com.iap.admin.view.AdminMenuView;
	
	import org.robotlegs.mvcs.Mediator;
	
	public class AdminMenuMediator extends Mediator
	{
		[Inject]
		public var view:AdminMenuView;

		override public function onRegister():void
		{
			view.menuSelected.add(menuSelectedHandler);
		}
		
		private function menuSelectedHandler(menuName:String):void
		{
			dispatch(new AdminMenuEvent(AdminMenuEvent.SELECTED, menuName));
		}			
	}
}